<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Jenkins集成各种工具 | 小阳爱技术</title>
    <meta name="generator" content="VuePress 1.9.5">
    <link rel="icon" href="/img/favicon.ico">
    <link rel="icon" href="/favicon.ico">
    <link rel="manifest" href="/manifest.json">
    <meta name="description" content="Python, Linux, Nginx, Django, Flask, WEB, 前端, Java 全栈知识体系, java体系, java知识体系, java框架,java详解,java学习路线,java spring, java面试, 知识体系, java技术体系, java编程, java编程指南,java开发体系, java开发,java教程,java,java数据结构, 算法, 开发基础">
    <meta name="keywords" content="Python, Linux, Nginx, Django, Flask, WEB, 前端, Java 全栈知识体系, java体系, java知识体系, java框架,java详解,java学习路线,java spring, java面试, 知识体系, java技术体系, java编程, java编程指南,java开发体系, java开发,java教程,java,java数据结构, 算法, 开发基础">
    <meta name="theme-color" content="#11a8cd">
    <meta name="robots" content="all">
    <meta name="author" content="小阳爱技术">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    
    <link rel="preload" href="/assets/css/0.styles.8cb71cba.css" as="style"><link rel="preload" href="/assets/js/app.9f33dad1.js" as="script"><link rel="preload" href="/assets/js/2.336839c5.js" as="script"><link rel="preload" href="/assets/js/29.b8c6cf94.js" as="script"><link rel="prefetch" href="/assets/js/10.78490e0e.js"><link rel="prefetch" href="/assets/js/11.358c0655.js"><link rel="prefetch" href="/assets/js/12.3d907ab6.js"><link rel="prefetch" href="/assets/js/13.e005782a.js"><link rel="prefetch" href="/assets/js/14.5c1831ed.js"><link rel="prefetch" href="/assets/js/15.3dae17f7.js"><link rel="prefetch" href="/assets/js/16.caf002bb.js"><link rel="prefetch" href="/assets/js/17.96d97c18.js"><link rel="prefetch" href="/assets/js/18.6f49a065.js"><link rel="prefetch" href="/assets/js/19.a72a1b44.js"><link rel="prefetch" href="/assets/js/20.5dbbd998.js"><link rel="prefetch" href="/assets/js/21.3b5c9825.js"><link rel="prefetch" href="/assets/js/22.588d1d79.js"><link rel="prefetch" href="/assets/js/23.bb2ba1d1.js"><link rel="prefetch" href="/assets/js/24.2036f1ef.js"><link rel="prefetch" href="/assets/js/25.7b40ded3.js"><link rel="prefetch" href="/assets/js/26.51a93ad7.js"><link rel="prefetch" href="/assets/js/27.23a56743.js"><link rel="prefetch" href="/assets/js/28.2bfb83a2.js"><link rel="prefetch" href="/assets/js/3.00f81f09.js"><link rel="prefetch" href="/assets/js/30.fe19a5d5.js"><link rel="prefetch" href="/assets/js/31.b68040bb.js"><link rel="prefetch" href="/assets/js/32.d9d3dba8.js"><link rel="prefetch" href="/assets/js/33.59561c54.js"><link rel="prefetch" href="/assets/js/34.243786a2.js"><link rel="prefetch" href="/assets/js/35.daf1b05e.js"><link rel="prefetch" href="/assets/js/36.13258281.js"><link rel="prefetch" href="/assets/js/37.4b591e31.js"><link rel="prefetch" href="/assets/js/38.13d6ce06.js"><link rel="prefetch" href="/assets/js/39.c51dd517.js"><link rel="prefetch" href="/assets/js/4.72262f85.js"><link rel="prefetch" href="/assets/js/40.227cf12d.js"><link rel="prefetch" href="/assets/js/41.8ada8611.js"><link rel="prefetch" href="/assets/js/42.b168f326.js"><link rel="prefetch" href="/assets/js/43.9df968fc.js"><link rel="prefetch" href="/assets/js/44.1546c9b1.js"><link rel="prefetch" href="/assets/js/45.c29bc1da.js"><link rel="prefetch" href="/assets/js/46.2de30989.js"><link rel="prefetch" href="/assets/js/47.34b5ca9a.js"><link rel="prefetch" href="/assets/js/5.56d0fbc7.js"><link rel="prefetch" href="/assets/js/6.b9ff2c2e.js"><link rel="prefetch" href="/assets/js/7.41c828d4.js"><link rel="prefetch" href="/assets/js/8.82412463.js"><link rel="prefetch" href="/assets/js/9.c499cdfa.js">
    <link rel="stylesheet" href="/assets/css/0.styles.8cb71cba.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open have-rightmenu"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="/img/logo.png" alt="小阳爱技术" class="logo"> <span class="site-name can-hide">小阳爱技术</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Python" class="dropdown-title"><a href="/python" class="link-title">Python</a> <span class="title" style="display:none;">Python</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/bc4b74/404" class="nav-link">暂无</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="DevOPs" class="dropdown-title"><a href="/devops/" class="link-title">DevOPs</a> <span class="title" style="display:none;">DevOPs</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>Git</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Git核心命令</a></li></ul></li><li class="dropdown-item"><h4>GitLab</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Gitlab基础</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">CI/CD语法</a></li></ul></li><li class="dropdown-item"><h4>Jernkins</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Jenkins入门</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Pipeline流水线语法</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Jenkins集成各种工具</a></li></ul></li><li class="dropdown-item"><h4>企业级流水线案例</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">企业级流水线的两个场景</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Npm企业流水线案例</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Java企业级流水线案例</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Python企业级流水线案例</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Golang企业级流水线案例</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="更多" class="dropdown-title"><a href="/more/" class="link-title">更多</a> <span class="title" style="display:none;">更多</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/f2a556/" class="nav-link">学习</a></li><li class="dropdown-item"><!----> <a href="/pages/aea6571b7a8bae86/" class="nav-link">面试</a></li><li class="dropdown-item"><!----> <a href="/pages/2d615df9a36a98ed/" class="nav-link">心情杂货</a></li><li class="dropdown-item"><!----> <a href="/pages/baaa02/" class="nav-link">实用技巧</a></li></ul></div></div><div class="nav-item"><a href="/about/" class="nav-link">关于</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="收藏" class="dropdown-title"><a href="/pages/beb6c0bd8a66cea6/" class="link-title">收藏</a> <span class="title" style="display:none;">收藏</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/beb6c0bd8a66cea6/" class="nav-link">网站</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="索引" class="dropdown-title"><a href="/archives/" class="link-title">索引</a> <span class="title" style="display:none;">索引</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/" class="nav-link">分类</a></li><li class="dropdown-item"><!----> <a href="/tags/" class="nav-link">标签</a></li><li class="dropdown-item"><!----> <a href="/archives/" class="nav-link">归档</a></li></ul></div></div> <a href="https://github.com//" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar-hover-trigger"></div> <aside class="sidebar" style="display:none;"><div class="blogger"><img src="/img/logo.png"> <div class="blogger-info"><h3>小阳爱技术</h3> <span>数据库管理员 &amp;&amp; 容器云狂热分子</span></div></div> <nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Python" class="dropdown-title"><a href="/python" class="link-title">Python</a> <span class="title" style="display:none;">Python</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/bc4b74/404" class="nav-link">暂无</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="DevOPs" class="dropdown-title"><a href="/devops/" class="link-title">DevOPs</a> <span class="title" style="display:none;">DevOPs</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>Git</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Git核心命令</a></li></ul></li><li class="dropdown-item"><h4>GitLab</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Gitlab基础</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">CI/CD语法</a></li></ul></li><li class="dropdown-item"><h4>Jernkins</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Jenkins入门</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Pipeline流水线语法</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Jenkins集成各种工具</a></li></ul></li><li class="dropdown-item"><h4>企业级流水线案例</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">企业级流水线的两个场景</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Npm企业流水线案例</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Java企业级流水线案例</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Python企业级流水线案例</a></li><li class="dropdown-subitem"><a href="/pages/8143cc480faf9a11/" class="nav-link">Golang企业级流水线案例</a></li></ul></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="更多" class="dropdown-title"><a href="/more/" class="link-title">更多</a> <span class="title" style="display:none;">更多</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/f2a556/" class="nav-link">学习</a></li><li class="dropdown-item"><!----> <a href="/pages/aea6571b7a8bae86/" class="nav-link">面试</a></li><li class="dropdown-item"><!----> <a href="/pages/2d615df9a36a98ed/" class="nav-link">心情杂货</a></li><li class="dropdown-item"><!----> <a href="/pages/baaa02/" class="nav-link">实用技巧</a></li></ul></div></div><div class="nav-item"><a href="/about/" class="nav-link">关于</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="收藏" class="dropdown-title"><a href="/pages/beb6c0bd8a66cea6/" class="link-title">收藏</a> <span class="title" style="display:none;">收藏</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/beb6c0bd8a66cea6/" class="nav-link">网站</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="索引" class="dropdown-title"><a href="/archives/" class="link-title">索引</a> <span class="title" style="display:none;">索引</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/categories/" class="nav-link">分类</a></li><li class="dropdown-item"><!----> <a href="/tags/" class="nav-link">标签</a></li><li class="dropdown-item"><!----> <a href="/archives/" class="nav-link">归档</a></li></ul></div></div> <a href="https://github.com//" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>git</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>gitlab</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>jenkins</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/pages/4e044c/" class="sidebar-link">Jenkins入门</a></li><li><a href="/pages/c6f51e/" class="sidebar-link">Jenkins流水线语法</a></li><li><a href="/pages/bc4b74/" aria-current="page" class="active sidebar-link">Jenkins集成各种工具</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level2"><a href="/pages/bc4b74/#jenkins-集成各种工具" class="sidebar-link">Jenkins 集成各种工具</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level3"><a href="/pages/bc4b74/#jenkins-集成-maven" class="sidebar-link">Jenkins 集成 Maven</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#安装maven" class="sidebar-link">安装Maven</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#jenkins-集成-maven-2" class="sidebar-link">Jenkins 集成 maven</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#添加jenkins全局变量" class="sidebar-link">添加Jenkins全局变量</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#优化maven的settings-xml" class="sidebar-link">优化Maven的settings.xml</a></li><li class="sidebar-sub-header level3"><a href="/pages/bc4b74/#jenkins-集成-gradle" class="sidebar-link">Jenkins 集成 Gradle</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#安装-gradle" class="sidebar-link">安装 Gradle</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#jenkins-集成-gradle-2" class="sidebar-link">Jenkins 集成 gradle</a></li><li class="sidebar-sub-header level3"><a href="/pages/bc4b74/#jenkins-集成-ant" class="sidebar-link">Jenkins 集成 Ant</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#安装-ant" class="sidebar-link">安装 Ant</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#jenkins-集成-ant-2" class="sidebar-link">Jenkins 集成 Ant</a></li><li class="sidebar-sub-header level3"><a href="/pages/bc4b74/#jenkins-集成-npm" class="sidebar-link">Jenkins 集成 Npm</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#jenkins-集成-npm-2" class="sidebar-link">Jenkins 集成 Npm</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#jenkins-集成-npm-3" class="sidebar-link">jenkins 集成 Npm</a></li><li class="sidebar-sub-header level3"><a href="/pages/bc4b74/#jenkins-集成禅道" class="sidebar-link">Jenkins 集成禅道</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#jenkins-安装-插件" class="sidebar-link">Jenkins 安装 插件</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#安装禅道" class="sidebar-link">安装禅道</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#配置-jenkins" class="sidebar-link">配置 Jenkins</a></li><li class="sidebar-sub-header level3"><a href="/pages/bc4b74/#jenkins-集成-sonarqube" class="sidebar-link">Jenkins 集成 SonarQube</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#安装-sonarqube" class="sidebar-link">安装 SonarQube</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#部署前提" class="sidebar-link">部署前提</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#部署-postgresql-数据库" class="sidebar-link">部署 postgresql 数据库</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#部署-sonarqube" class="sidebar-link">部署 SonarQube</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#启动-sonarqube" class="sidebar-link">启动 SonarQube</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#集成-gitlab-单点登录" class="sidebar-link">集成 Gitlab 单点登录</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#汉化-sonarqube" class="sidebar-link">汉化 SonarQube</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#jenkins-集成-sonarqube-2" class="sidebar-link">Jenkins 集成 SonarQube</a></li><li class="sidebar-sub-header level5"><a href="/pages/bc4b74/#安装-sonarqube-scanner-插件" class="sidebar-link">安装 sonarqube-Scanner 插件</a></li><li class="sidebar-sub-header level5"><a href="/pages/bc4b74/#添加sonarqube凭证" class="sidebar-link">添加SonarQube凭证</a></li><li class="sidebar-sub-header level6"><a href="/pages/bc4b74/#创建令牌凭证" class="sidebar-link">创建令牌凭证</a></li><li class="sidebar-sub-header level5"><a href="/pages/bc4b74/#jenkins进行sonarqube配置" class="sidebar-link">Jenkins进行SonarQube配置</a></li><li class="sidebar-sub-header level5"><a href="/pages/bc4b74/#sonaqube关闭审查结果上传到scm功能" class="sidebar-link">SonaQube关闭审查结果上传到SCM功能</a></li><li class="sidebar-sub-header level5"><a href="/pages/bc4b74/#测试-jenkins-链接-sonarqube" class="sidebar-link">测试 Jenkins 链接 SonarQube</a></li><li class="sidebar-sub-header level6"><a href="/pages/bc4b74/#在-java-项目中增加配置文件" class="sidebar-link">在 Java 项目中增加配置文件</a></li><li class="sidebar-sub-header level6"><a href="/pages/bc4b74/#测试-pipeline" class="sidebar-link">测试 pipeline</a></li><li class="sidebar-sub-header level4"><a href="/pages/bc4b74/#sonarqube-质量阀" class="sidebar-link">SonarQube 质量阀</a></li><li class="sidebar-sub-header level5"><a href="/pages/bc4b74/#设置-sonarqube-质量阀" class="sidebar-link">设置 SonarQube 质量阀</a></li><li class="sidebar-sub-header level5"><a href="/pages/bc4b74/#pipline-判断" class="sidebar-link">pipline 判断</a></li><li class="sidebar-sub-header level6"><a href="/pages/bc4b74/#添加-pipeline-语法" class="sidebar-link">添加 pipeline 语法</a></li></ul></li></ul></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>企业级流水线</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>自动化测试流水线</span> <span class="arrow right"></span></p> <!----></section></li></ul> </aside> <div><main class="page"><div class="theme-vdoing-wrapper "><div class="articleInfo-wrap" data-v-06225672><div class="articleInfo" data-v-06225672><ul class="breadcrumbs" data-v-06225672><li data-v-06225672><a href="/" title="首页" class="iconfont icon-home router-link-active" data-v-06225672></a></li> <li data-v-06225672><a href="/categories/?category=DevOps" title="分类" data-v-06225672>DevOps</a></li><li data-v-06225672><a href="/categories/?category=jenkins" title="分类" data-v-06225672>jenkins</a></li></ul> <div class="info" data-v-06225672><div title="作者" class="author iconfont icon-touxiang" data-v-06225672><a href="https://blog.abck8s.com" target="_blank" title="作者" class="beLink" data-v-06225672>小阳爱技术</a></div> <div title="创建时间" class="date iconfont icon-riqi" data-v-06225672><a href="javascript:;" data-v-06225672>2022-06-23</a></div> <!----></div></div></div> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-title">目录</div> <div class="right-menu-content"></div></div></div> <h1><img src="">Jenkins集成各种工具<!----></h1>  <div class="theme-vdoing-content content__default"><h2 id="jenkins-集成各种工具"><a href="#jenkins-集成各种工具" class="header-anchor">#</a> Jenkins 集成各种工具</h2> <p>我们常用的工具有很多，例如编译java的、编译js以及禅道回调相关的工具都需要集成到Jenkins之中。</p> <h3 id="jenkins-集成-maven"><a href="#jenkins-集成-maven" class="header-anchor">#</a> Jenkins 集成 Maven</h3> <p>在 Jenkins 集成服务器上，我们需要安装 Maven 来编译和打包项目。</p> <h4 id="安装maven"><a href="#安装maven" class="header-anchor">#</a> 安装Maven</h4> <p>部署 Maven 要求 JDK 必须是 1.7+。</p> <blockquote><p>下载链接：https://maven.apache.org/download.cgi</p></blockquote> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">wget</span> https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz

$ <span class="token function">tar</span> -xf apache-maven-3.8.6-bin.tar.gz -C /usr/local/
$ <span class="token function">vim</span> <span class="token function">vim</span> /etc/profile
$ <span class="token builtin class-name">export</span> <span class="token assign-left variable">MAVEN_HOME</span><span class="token operator">=</span>/usr/local/apache-maven-3.8.6
$ <span class="token builtin class-name">export</span> <span class="token assign-left variable"><span class="token environment constant">PATH</span></span><span class="token operator">=</span><span class="token environment constant">$PATH</span><span class="token builtin class-name">:</span><span class="token variable">$MAVEN_HOME</span>/bin
$ <span class="token builtin class-name">source</span> /etc/profile
$ mvn --version
Apache Maven <span class="token number">3.8</span>.6 <span class="token punctuation">(</span>84538c9988a25aec085021c365c560670ad80f63<span class="token punctuation">)</span>
Maven home: /usr/local/apache-maven-3.8.6
Java version: <span class="token number">1.8</span>.0_332, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: <span class="token string">&quot;linux&quot;</span>, version: <span class="token string">&quot;3.10.0-1160.66.1.el7.x86_64&quot;</span>, arch: <span class="token string">&quot;amd64&quot;</span>, family: <span class="token string">&quot;unix&quot;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br></div></div><h4 id="jenkins-集成-maven-2"><a href="#jenkins-集成-maven-2" class="header-anchor">#</a> Jenkins 集成 maven</h4> <p>jenkins --&gt; 系统配置 --&gt; 全局工具配置</p> <p><img src="/img/image-20220621154628732.png" alt="image-20220621154628732"></p> <p><img src="/img/image-20220621154643488.png" alt="image-20220621154643488"></p> <h4 id="添加jenkins全局变量"><a href="#添加jenkins全局变量" class="header-anchor">#</a> 添加Jenkins全局变量</h4> <p>jenkins --&gt; 全局工具配置 --&gt; 全局工具配置</p> <p><img src="/img/image-20220621155432312.png" alt="image-20220621155432312"></p> <h4 id="优化maven的settings-xml"><a href="#优化maven的settings-xml" class="header-anchor">#</a> 优化Maven的settings.xml</h4> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">mkdir</span> -pv /data/software/repository
$ <span class="token function">chown</span> -R jenkins.jenkins /data/
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>修改详情</p> <div class="language-xml line-numbers-mode"><pre class="language-xml"><code><span class="token comment">&lt;!--本地仓库--&gt;</span>          
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>localRepository</span><span class="token punctuation">&gt;</span></span>/data/software/repository<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>localRepository</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>mirrors</span><span class="token punctuation">&gt;</span></span>
    <span class="token comment">&lt;!--阿里云镜像--&gt;</span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>mirror</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>id</span><span class="token punctuation">&gt;</span></span>aliyun-maven<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>id</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>mirrorOf</span><span class="token punctuation">&gt;</span></span>central<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>mirrorOf</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>name</span><span class="token punctuation">&gt;</span></span>aliyun maven mirror<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>name</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>url</span><span class="token punctuation">&gt;</span></span>http://maven.aliyun.com/nexus/content/groups/public/<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>url</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>mirror</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>mirrors</span><span class="token punctuation">&gt;</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><p>测试</p> <div class="language-groovy line-numbers-mode"><pre class="language-groovy"><code>pipeline<span class="token punctuation">{</span>
    agent any
    stages<span class="token punctuation">{</span>
        <span class="token function">stage</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">&quot;first stage&quot;</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
            <span class="token function">steps</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">&quot;first steps&quot;</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
                script <span class="token punctuation">{</span>
                    sh <span class="token interpolation-string"><span class="token string">&quot;&quot;&quot;
                    mvn -v
                    &quot;&quot;&quot;</span></span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
    post <span class="token punctuation">{</span>
        always <span class="token punctuation">{</span>
            echo <span class="token interpolation-string"><span class="token string">&quot;运行成功&quot;</span></span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br></div></div><p><img src="/img/image-20220621160950463.png" alt="image-20220621160950463"></p> <h3 id="jenkins-集成-gradle"><a href="#jenkins-集成-gradle" class="header-anchor">#</a> Jenkins 集成 Gradle</h3> <p>gradle 是一个 Java 构建自动化的工具,类似于maven,ant的功能。使用 gradle 可以给 java 项目编译,单元测试,打包,或者生成可执行的jar包等。</p> <h4 id="安装-gradle"><a href="#安装-gradle" class="header-anchor">#</a> 安装 Gradle</h4> <p>Gradle 可在所有主要操作系统上运行，并且只需要安装Java JDK 8 或更高版本。</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>$ java -version
openjdk version <span class="token string">&quot;1.8.0_332&quot;</span>
OpenJDK Runtime Environment <span class="token punctuation">(</span>build <span class="token number">1.8</span>.0_332-b09<span class="token punctuation">)</span>
OpenJDK <span class="token number">64</span>-Bit Server VM <span class="token punctuation">(</span>build <span class="token number">25.332</span>-b09, mixed mode<span class="token punctuation">)</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><blockquote><p>下载链接：https://gradle.org/install/</p></blockquote> <p><img src="/img/image-20220621165658096.png" alt="image-20220621165658096"></p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">wget</span> https://downloads.gradle-dn.com/distributions/gradle-7.4.2-bin.zip
$ <span class="token function">unzip</span> gradle-7.4.2-bin.zip -d /usr/local/
$ <span class="token function">vim</span> /etc/profile
<span class="token builtin class-name">export</span> <span class="token assign-left variable">GRADLE_HOME</span><span class="token operator">=</span>/usr/local/gradle-7.4.2
<span class="token builtin class-name">export</span> <span class="token assign-left variable"><span class="token environment constant">PATH</span></span><span class="token operator">=</span><span class="token environment constant">$PATH</span><span class="token builtin class-name">:</span><span class="token variable">$GRADLE_HOME</span>/bin
$ <span class="token builtin class-name">source</span> /etc/profile
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><h4 id="jenkins-集成-gradle-2"><a href="#jenkins-集成-gradle-2" class="header-anchor">#</a> Jenkins 集成 gradle</h4> <p>Jenkins-&gt;Manage Jenkins-&gt;Manage Plugins，点击Advanced</p> <p><img src="/img/image-20220621170203983.png" alt="image-20220621170203983"></p> <p>jenkins --&gt; 系统管理 --&gt; 全局工具配置</p> <p><img src="/img/image-20220621170352424.png" alt="image-20220621170352424"></p> <p>jenkins --&gt; 全局工具配置 --&gt; 全局工具配置</p> <p><img src="/img/image-20220621170501715.png" alt="image-20220621170501715"></p> <p>测试</p> <div class="language-groovy line-numbers-mode"><pre class="language-groovy"><code>pipeline<span class="token punctuation">{</span>
    agent any
    stages<span class="token punctuation">{</span>
        <span class="token function">stage</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">&quot;first stage&quot;</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
            <span class="token function">steps</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">&quot;first steps&quot;</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
                sh <span class="token interpolation-string"><span class="token string">&quot;&quot;&quot;
                    gradle -v
                &quot;&quot;&quot;</span></span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
    post <span class="token punctuation">{</span>
        always <span class="token punctuation">{</span>
            echo <span class="token interpolation-string"><span class="token string">&quot;运行成功&quot;</span></span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br></div></div><p><img src="/img/image-20220621170553115.png" alt="image-20220621170553115"></p> <h3 id="jenkins-集成-ant"><a href="#jenkins-集成-ant" class="header-anchor">#</a> Jenkins 集成 Ant</h3> <p>Ant是跨平台的构建工具，它可以实现项目的自动构建和部署等功能。</p> <h4 id="安装-ant"><a href="#安装-ant" class="header-anchor">#</a> 安装 Ant</h4> <blockquote><p>下载路径：https://ant.apache.org/bindownload.cgi</p></blockquote> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">wget</span> https://dlcdn.apache.org//ant/binaries/apache-ant-1.10.12-bin.tar.gz
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><img src="/img/image-20220621161524227.png" alt="image-20220621161524227"></p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">tar</span> -xf apache-ant-1.10.12-bin.tar.gz -C /usr/local/
$ <span class="token function">vim</span> /etc/profile
$ <span class="token builtin class-name">export</span> <span class="token assign-left variable">ANT_HOME</span><span class="token operator">=</span>/usr/local/apache-ant-1.10.12
$ <span class="token builtin class-name">export</span> <span class="token assign-left variable"><span class="token environment constant">PATH</span></span><span class="token operator">=</span><span class="token environment constant">$PATH</span><span class="token builtin class-name">:</span><span class="token variable">$MAVEN_HOME</span>/bin:<span class="token variable">$ANT_HOME</span>/bin
$ <span class="token builtin class-name">source</span> /etc/profile
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><h4 id="jenkins-集成-ant-2"><a href="#jenkins-集成-ant-2" class="header-anchor">#</a> Jenkins 集成 Ant</h4> <p>Jenkins-&gt;Manage Jenkins-&gt;Manage Plugins，点击Advanced</p> <p><img src="/img/image-20220621162515254.png" alt="image-20220621162515254"></p> <p>jenkins --&gt; 系统管理 --&gt; 全局工具配置</p> <p><img src="/img/image-20220621162749268.png" alt="image-20220621162749268"></p> <p>jenkins --&gt; 全局工具配置 --&gt; 全局工具配置</p> <p><img src="/img/image-20220621162302593.png" alt="image-20220621162302593"></p> <p>测试</p> <p><img src="/img/image-20220621163803833.png" alt="image-20220621163803833"></p> <h3 id="jenkins-集成-npm"><a href="#jenkins-集成-npm" class="header-anchor">#</a> Jenkins 集成 Npm</h3> <p>前端项目的构建通常需要使用 npm。npm 首先需要安装 nodejs。</p> <blockquote><p>下载链接：https://nodejs.org/en/download/</p></blockquote> <p><img src="/img/image-20220621163945773.png" alt="image-20220621163945773"></p> <h4 id="jenkins-集成-npm-2"><a href="#jenkins-集成-npm-2" class="header-anchor">#</a> Jenkins 集成 Npm</h4> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>$ <span class="token function">tar</span> xf node-v16.15.1-linux-x64.tar.xz -C /usr/local/
$ <span class="token function">vim</span> /etc/profile
$ <span class="token builtin class-name">export</span> <span class="token assign-left variable">NODE_HOME</span><span class="token operator">=</span>/usr/local/node-v16.15.1-linux-x64
$ <span class="token builtin class-name">export</span> <span class="token assign-left variable"><span class="token environment constant">PATH</span></span><span class="token operator">=</span><span class="token environment constant">$PATH</span><span class="token builtin class-name">:</span><span class="token variable">$NODE_HOME</span>/bin
$ <span class="token builtin class-name">source</span> /etc/profile
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><p><img src="/img/image-20220621164217487.png" alt="image-20220621164217487"></p> <h4 id="jenkins-集成-npm-3"><a href="#jenkins-集成-npm-3" class="header-anchor">#</a> jenkins 集成 Npm</h4> <p>Jenkins-&gt;Manage Jenkins-&gt;Manage Plugins，点击Advanced</p> <p><img src="/img/image-20220621164419983.png" alt="image-20220621164419983"></p> <p>jenkins --&gt; 系统管理 --&gt; 全局工具配置</p> <p><img src="/img/image-20220621164617703.png" alt="image-20220621164617703"></p> <p>jenkins --&gt; 全局工具配置 --&gt; 全局工具配置</p> <p><img src="/img/image-20220621164900311.png" alt="image-20220621164900311"></p> <p>测试</p> <p><img src="/img/image-20220621164742569.png" alt="image-20220621164742569"></p> <h3 id="jenkins-集成禅道"><a href="#jenkins-集成禅道" class="header-anchor">#</a> Jenkins 集成禅道</h3> <p>禅道是我们在企业中经常用到的一个工具。</p> <blockquote><p>集成文档：https://www.zentao.net/book/zentaopmshelp/393.html</p></blockquote> <h4 id="jenkins-安装-插件"><a href="#jenkins-安装-插件" class="header-anchor">#</a> Jenkins 安装 插件</h4> <p>Jenkins-&gt;Manage Jenkins-&gt;Manage Plugins，点击Advanced</p> <p><img src="/img/image-20220621181029479.png" alt="image-20220621181029479"></p> <h4 id="安装禅道"><a href="#安装禅道" class="header-anchor">#</a> 安装禅道</h4> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">docker</span> run --name chandao -p <span class="token number">80</span>:80 -v /opt/chandao:/www/zentaopms <span class="token punctuation">\</span>
       -v /opt/chandao_mysql:/var/lib/mysql <span class="token punctuation">\</span>
       -e <span class="token assign-left variable">MYSQL_ROOT_PASSWORD</span><span class="token operator">=</span><span class="token number">123456</span> -d easysoft/zentao
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br></div></div><h4 id="配置-jenkins"><a href="#配置-jenkins" class="header-anchor">#</a> 配置 Jenkins</h4> <p><img src="/img/image-20220621181352310.png" alt="image-20220621181352310"></p> <p><img src="/img/image-20220621181426669.png" alt="image-20220621181426669"></p> <p><img src="/img/image-20220621182128265.png" alt="image-20220621182128265"></p> <p><img src="/img/image-20220621182140958.png" alt="image-20220621182140958"></p> <p>测试</p> <p><img src="/img/image-20220621182959182.png" alt="image-20220621182959182"></p> <p><img src="/img/image-20220621183042108.png" alt="image-20220621183042108"></p> <h3 id="jenkins-集成-sonarqube"><a href="#jenkins-集成-sonarqube" class="header-anchor">#</a> Jenkins 集成 SonarQube</h3> <p>SonarQube是一个用于管理代码质量的开放平台，可以快速的定位代码中潜在的或者明显的错误。目前 支持java,C#,C/C++,Python,PL/SQL,Cobol,JavaScrip,Groovy等二十几种编程语言的代码质量管理与检测。通过SonarQube 我们还可以检测出项目中重复代码， 潜在bug， 代码规范，安全性漏洞等问题， 并通过SonarQube web UI展示出来。</p> <h4 id="安装-sonarqube"><a href="#安装-sonarqube" class="header-anchor">#</a> 安装 SonarQube</h4> <blockquote><p>官网：https://www.sonarqube.org/</p></blockquote> <p><img src="/img/image-20220621193010196.png" alt="image-20220621193010196"></p> <h4 id="部署前提"><a href="#部署前提" class="header-anchor">#</a> 部署前提</h4> <p>运行 SonarQube 的唯一先决条件是在您的机器上安装 Java（Oracle JRE 11 或 OpenJDK 11）。同时还需要满足如下条件：</p> <ul><li><p><code>vm.max_map_count</code>大于或等于 524288</p></li> <li><p><code>fs.file-max</code>大于或等于 131072</p></li> <li><p>运行 SonarQube 的用户可以打开至少 131072 个文件描述符</p></li> <li><p>运行 SonarQube 的用户至少可以打开 8192 个线程</p></li></ul> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>$ sysctl -w vm.max_map_count<span class="token operator">=</span><span class="token number">524288</span>
$ sysctl -w fs.file-max<span class="token operator">=</span><span class="token number">131072</span>
$ <span class="token builtin class-name">ulimit</span> -n <span class="token number">131072</span>
$ <span class="token builtin class-name">ulimit</span> -u <span class="token number">8192</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p><img src="/img/image-20220621193052081.png" alt="image-20220621193052081"></p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>$ yum <span class="token function">install</span> java-11-openjdk.x86_64 -y
$ yum <span class="token function">install</span> java-11-openjdk-devel -y
$ <span class="token function">wget</span> https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-8.9.8.54436.zip
$ <span class="token function">unzip</span> sonarqube-8.9.8.54436.zip 
$ <span class="token function">mv</span> sonarqube-8.9.8.54436 /usr/local/

<span class="token comment"># 创建用户</span>
$ <span class="token function">useradd</span> sonar

<span class="token comment"># 授权</span>
$ <span class="token function">chown</span> -R sonar /usr/local/sonarqube-8.9.8.54436
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br></div></div><h4 id="部署-postgresql-数据库"><a href="#部署-postgresql-数据库" class="header-anchor">#</a> 部署 postgresql 数据库</h4> <p>为了方便，这里采用docker的方式部署，在企业生产环境中建议部署在虚拟机中。</p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">docker</span> run --name postgresql <span class="token punctuation">\</span>
  -e <span class="token assign-left variable">POSTGRESQL_USERNAME</span><span class="token operator">=</span>root <span class="token punctuation">\</span>
  -e <span class="token assign-left variable">POSTGRESQL_PASSWORD</span><span class="token operator">=</span><span class="token number">123456</span> <span class="token punctuation">\</span>
  -e <span class="token assign-left variable">POSTGRESQL_DATABASE</span><span class="token operator">=</span>sonar <span class="token punctuation">\</span>
  -p <span class="token number">5432</span>:5432 <span class="token punctuation">\</span>
  bitnami/postgresql:latest
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br></div></div><h4 id="部署-sonarqube"><a href="#部署-sonarqube" class="header-anchor">#</a> 部署 SonarQube</h4> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>$ <span class="token function">vim</span> /usr/local/sonarqube-8.9.8.54436/conf/sonar.properties 
sonar.jdbc.url<span class="token operator">=</span>jdbc:postgresql://172.16.0.30/sonar?currentSchema<span class="token operator">=</span>public
sonar.jdbc.username<span class="token operator">=</span>root
sonar.jdbc.password<span class="token operator">=</span><span class="token number">123456</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><h4 id="启动-sonarqube"><a href="#启动-sonarqube" class="header-anchor">#</a> 启动 SonarQube</h4> <blockquote><p>需要注意的是，SonarQube 默认不支持 root 用户启动，所以如果需要启动 SonarQube 需要用一个普通用户启动。</p></blockquote> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code><span class="token comment"># 启动</span>
$ <span class="token function">su</span> sonar ./bin/linux-x86-64/sonar.sh start 
Starting SonarQube<span class="token punctuation">..</span>.
Started SonarQube.
<span class="token comment"># 查看状态</span>
$ <span class="token function">su</span> sonar ./bin/linux-x86-64/sonar.sh status
SonarQube is running <span class="token punctuation">(</span><span class="token number">1528</span><span class="token punctuation">)</span>.
<span class="token comment"># 停止</span>
$ <span class="token function">su</span> sonar ./bin/linux-x86-64/sonar.sh stop
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br></div></div><p>这里需要注意的是，SonarQube 最长出现问题的地方是 ES，所以我们可以查看 ES 的日志，根据日志的具体报错信息逐一解决。</p> <p>访问：http://192.168.15.21:9000</p> <p>默认用户名密码均为：admin</p> <p><img src="/img/image-20220621200215879.png" alt="image-20220621200215879"></p> <p><img src="/img/image-20220621200354319.png" alt="image-20220621200354319"></p> <h4 id="集成-gitlab-单点登录"><a href="#集成-gitlab-单点登录" class="header-anchor">#</a> 集成 Gitlab 单点登录</h4> <p>sonarqube 支持多种认证登录方式，如果使用自带的账号体系，需要管理员一个个添加账号，使用起来多有不便。不过一般公司都部署了私有化的 <a href="https://so.csdn.net/so/search?q=Gitlab&amp;spm=1001.2101.3001.7020" target="_blank" rel="noopener noreferrer">Gitlab<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>，我们可以利用私有的 gitlab 账号来登录 Sonarqube。</p> <blockquote><p>注意：如果 SonarQube 的 URL 不是 HTTPS 的话，则设置的 GitLab 单点登录会失败。</p></blockquote> <p><img src="/img/image-20220621200637068.png" alt="image-20220621200637068"></p> <p><img src="/img/image-20220621200803132.png" alt="image-20220621200803132"></p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>http://<span class="token punctuation">[</span>sonarhost<span class="token punctuation">]</span>:<span class="token punctuation">[</span>port<span class="token punctuation">]</span>/oauth2/callback/gitlab
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><img src="/img/image-20220621200925885.png" alt="image-20220621200925885"></p> <p><img src="/img/image-20220621201009939.png" alt="image-20220621201009939"></p> <h4 id="汉化-sonarqube"><a href="#汉化-sonarqube" class="header-anchor">#</a> 汉化 SonarQube</h4> <p><img src="/img/image-20220621202110592.png" alt="image-20220621202110592"></p> <h4 id="jenkins-集成-sonarqube-2"><a href="#jenkins-集成-sonarqube-2" class="header-anchor">#</a> Jenkins 集成 SonarQube</h4> <p>上面我们已经成功安装了 SonarQube，这里我们使用 Jenkins 来调用 SonarQube。</p> <h5 id="安装-sonarqube-scanner-插件"><a href="#安装-sonarqube-scanner-插件" class="header-anchor">#</a> 安装 sonarqube-Scanner 插件</h5> <p>Jenkins-&gt;Manage Jenkins-&gt;Manage Plugins，点击Advanced</p> <p><img src="/img/image-20220622012316870.png" alt="image-20220622012316870"></p> <h5 id="添加sonarqube凭证"><a href="#添加sonarqube凭证" class="header-anchor">#</a> 添加SonarQube凭证</h5> <p>SonarQube 凭证是 Jenkins 访问 SonarQube 凭证。</p> <h6 id="创建令牌凭证"><a href="#创建令牌凭证" class="header-anchor">#</a> 创建令牌凭证</h6> <p><img src="/img/image-20220622012647926.png" alt="image-20220622012647926"></p> <p><img src="/img/image-20220622012738410.png" alt="image-20220622012738410"></p> <p><img src="/img/image-20220622012833355.png" alt="image-20220622012833355"></p> <h5 id="jenkins进行sonarqube配置"><a href="#jenkins进行sonarqube配置" class="header-anchor">#</a> Jenkins进行SonarQube配置</h5> <p>Jenkins -&gt; 系统配置 -&gt; SonarQube servers</p> <p><img src="/img/image-20220622013038778.png" alt="image-20220622013038778"></p> <p>Jenkins -&gt; 全局工具配置</p> <p><img src="/img/image-20220622013244596.png" alt="image-20220622013244596"></p> <h5 id="sonaqube关闭审查结果上传到scm功能"><a href="#sonaqube关闭审查结果上传到scm功能" class="header-anchor">#</a> SonaQube关闭审查结果上传到SCM功能</h5> <p><img src="/img/image-20220622013351346.png" alt="image-20220622013351346"></p> <h5 id="测试-jenkins-链接-sonarqube"><a href="#测试-jenkins-链接-sonarqube" class="header-anchor">#</a> 测试 Jenkins 链接 SonarQube</h5> <blockquote><p>官方文档：https://docs.sonarqube.org/8.9/analysis/scan/sonarscanner-for-jenkins/</p></blockquote> <h6 id="在-java-项目中增加配置文件"><a href="#在-java-项目中增加配置文件" class="header-anchor">#</a> 在 Java 项目中增加配置文件</h6> <p><img src="/img/image-20220622013700381.png" alt="image-20220622013700381"></p> <h6 id="测试-pipeline"><a href="#测试-pipeline" class="header-anchor">#</a> 测试 pipeline</h6> <div class="language-groovy line-numbers-mode"><pre class="language-groovy"><code>pipeline<span class="token punctuation">{</span>
    agent any
    stages<span class="token punctuation">{</span>
        <span class="token function">stage</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">&quot;拉取代码&quot;</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
            steps <span class="token punctuation">{</span>
                <span class="token function">checkout</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token punctuation">$</span><span class="token keyword">class</span><span class="token punctuation">:</span> <span class="token string">'GitSCM'</span><span class="token punctuation">,</span> branches<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">[</span>name<span class="token punctuation">:</span> <span class="token string">'*/main'</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span> extensions<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span> userRemoteConfigs<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">[</span>credentialsId<span class="token punctuation">:</span> <span class="token string">'68a87abf-6af7-4e60-94dd-cf45c280c247'</span><span class="token punctuation">,</span> url<span class="token punctuation">:</span> <span class="token string">'git@gitlab.abck8s.com:xiaoyangaijishu/spring-cloud-eureka-master.git'</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        <span class="token function">stage</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">&quot;编译构建&quot;</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
            steps <span class="token punctuation">{</span>
                sh <span class="token interpolation-string"><span class="token string">&quot;&quot;&quot;
                	mvn clean package
                &quot;&quot;&quot;</span></span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        <span class="token function">stage</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">&quot;SonarQube代码审查&quot;</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
            steps <span class="token punctuation">{</span>
                script <span class="token punctuation">{</span>
                    scannerHome <span class="token operator">=</span> tool <span class="token string">'sonarqube-scanner'</span>
                <span class="token punctuation">}</span>
            	<span class="token function">withSonarQubeEnv</span><span class="token punctuation">(</span><span class="token string">'sonarqube8.9.8'</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                	sh <span class="token interpolation-string"><span class="token string">&quot;</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span><span class="token expression">scannerHome</span><span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">/bin/sonar-scanner&quot;</span></span>
            	<span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br></div></div><p><img src="/img/image-20220622124231200.png" alt="image-20220622124231200"></p> <p>我们可以看到的是，Jenkins 已经成功调用 sonarscanner，并把该项目分析分析结果成功放在了 SonarQube 中。</p> <h4 id="sonarqube-质量阀"><a href="#sonarqube-质量阀" class="header-anchor">#</a> SonarQube 质量阀</h4> <p>通常，我们扫描代码之后，如果出现了 BUG，那么此时我们应该停止部署，这个就是需要用到 SonarQube 质量阀。设置 SonarQube 质量阀需要两个步骤，分别是设置质量阀和 pipline 判断。</p> <h5 id="设置-sonarqube-质量阀"><a href="#设置-sonarqube-质量阀" class="header-anchor">#</a> 设置 SonarQube 质量阀</h5> <p><img src="/img/image-20220623135532583.png" alt="image-20220623135532583"></p> <p><img src="/img/image-20220623135633016.png" alt="image-20220623135633016"></p> <p><img src="/img/image-20220623135817012.png" alt="image-20220623135817012"></p> <p><img src="/img/image-20220623135849805.png" alt="image-20220623135849805"></p> <div class="language-bash line-numbers-mode"><pre class="language-bash"><code>https://jenkins.abck8s.com/sonarqube-webhook/
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h5 id="pipline-判断"><a href="#pipline-判断" class="header-anchor">#</a> pipline 判断</h5> <p><img src="/img/image-20220623140038120.png" alt="image-20220623140038120"></p> <h6 id="添加-pipeline-语法"><a href="#添加-pipeline-语法" class="header-anchor">#</a> 添加 pipeline 语法</h6> <div class="language-groovy line-numbers-mode"><pre class="language-groovy"><code>pipeline<span class="token punctuation">{</span>
    agent any
    stages<span class="token punctuation">{</span>
        <span class="token function">stage</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">&quot;拉取代码&quot;</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
            steps <span class="token punctuation">{</span>
                <span class="token function">checkout</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token punctuation">$</span><span class="token keyword">class</span><span class="token punctuation">:</span> <span class="token string">'GitSCM'</span><span class="token punctuation">,</span> branches<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">[</span>name<span class="token punctuation">:</span> <span class="token string">'*/main'</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">,</span> extensions<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">,</span> userRemoteConfigs<span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">[</span>credentialsId<span class="token punctuation">:</span> <span class="token string">'68a87abf-6af7-4e60-94dd-cf45c280c247'</span><span class="token punctuation">,</span> url<span class="token punctuation">:</span> <span class="token string">'git@gitlab.abck8s.com:xiaoyangaijishu/spring-cloud-eureka-master.git'</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        <span class="token function">stage</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">&quot;SonarQube代码审查&quot;</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
            steps <span class="token punctuation">{</span>
                script <span class="token punctuation">{</span>
                    scannerHome <span class="token operator">=</span> tool <span class="token string">'sonarqube-scanner'</span>
                <span class="token punctuation">}</span>
            	<span class="token function">withSonarQubeEnv</span><span class="token punctuation">(</span><span class="token string">'sonarqube8.9.8'</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
                	sh <span class="token interpolation-string"><span class="token string">&quot;</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span><span class="token expression">scannerHome</span><span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">/bin/sonar-scanner&quot;</span></span>
            	<span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        <span class="token function">stage</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">&quot;判断代码扫描状态&quot;</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
        	steps <span class="token punctuation">{</span>
    			script <span class="token punctuation">{</span>
    			    <span class="token function">timeout</span><span class="token punctuation">(</span><span class="token number">5</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    				    qg <span class="token operator">=</span> <span class="token function">waitForQualityGate</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
        				<span class="token keyword">if</span> <span class="token punctuation">(</span>qg<span class="token punctuation">.</span>status <span class="token operator">!=</span> <span class="token string">'OK'</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
          					error <span class="token interpolation-string"><span class="token string">&quot;扫描失败，状态错误: </span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span><span class="token expression">qg<span class="token punctuation">.</span>status</span><span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">&quot;</span></span>
                        <span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span>
                            echo <span class="token interpolation-string"><span class="token string">&quot;扫描成功&quot;</span></span>
                        <span class="token punctuation">}</span>
    				<span class="token punctuation">}</span>
 			 	<span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        <span class="token function">stage</span><span class="token punctuation">(</span><span class="token interpolation-string"><span class="token string">&quot;编译构建&quot;</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
            steps <span class="token punctuation">{</span>
                sh <span class="token interpolation-string"><span class="token string">&quot;&quot;&quot;
                	mvn clean package
                &quot;&quot;&quot;</span></span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br></div></div><p><img src="/img/image-20220623140328818.png" alt="image-20220623140328818"></p> <p><img src="/img/image-20220623140352769.png" alt="image-20220623140352769"></p></div></div>  <div class="page-edit"><div class="edit-link"><a href="https://github.com//edit/master/docs/05.DevOps/03.jenkins/03.Jenkins集成各种工具.md" target="_blank" rel="noopener noreferrer">编辑</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <!----> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">2022/06/24, 12:24:14</span></div></div> <div class="page-nav-wapper"><div class="page-nav-centre-wrap"><a href="/pages/c6f51e/" class="page-nav-centre page-nav-centre-prev"><div class="tooltip">Jenkins流水线语法</div></a> <a href="/pages/894626/" class="page-nav-centre page-nav-centre-next"><div class="tooltip">企业级流水线的两种部署场景</div></a></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/pages/c6f51e/" class="prev">Jenkins流水线语法</a></span> <span class="next"><a href="/pages/894626/">企业级流水线的两种部署场景</a>→
      </span></p></div></div></div> <div class="article-list"><div class="article-title"><a href="/archives/" class="iconfont icon-bi">最近更新</a></div> <div class="article-wrapper"><dl><dd>01</dd> <dt><a href="/pages/894626/"><div>
            企业级流水线的两种部署场景
            <!----></div></a> <span class="date">06-23</span></dt></dl><dl><dd>02</dd> <dt><a href="/pages/c6f51e/"><div>
            Jenkins流水线语法
            <!----></div></a> <span class="date">06-23</span></dt></dl><dl><dd>03</dd> <dt><a href="/pages/30f9ff/"><div>
            01、Git
            <!----></div></a> <span class="date">06-22</span></dt></dl> <dl><dd></dd> <dt><a href="/archives/" class="more">更多文章&gt;</a></dt></dl></div></div></main></div> <div class="footer"><div class="icons"><a href="mailto:chenyangqit@163.com" title="发邮件" target="_blank" class="iconfont icon-youjian"></a><a href="https://juejin.cn/user/730513894553032/course" title="掘金" target="_blank" class="iconfont icon-juejin"></a><a href="/img/weixin.jpg" title="微信" target="_blank" class="iconfont icon-weixin"></a><a href="https://music.163.com/#/playlist?id=755597173" title="听音乐" target="_blank" class="iconfont icon-erji"></a></div> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> 
    | Copyright © 2019-2022
    <span>小阳爱技术 | <a href="https://blog.abck8s.com" target="_blank">MIT License</a></span></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">
          跟随系统
        </li><li class="iconfont icon-rijianmoshi">
          浅色模式
        </li><li class="iconfont icon-yejianmoshi">
          深色模式
        </li><li class="iconfont icon-yuedu">
          阅读模式
        </li></ul></div></div> <!----> <!----> <!----></div><div class="global-ui"><div></div></div></div>
    <script src="/assets/js/app.9f33dad1.js" defer></script><script src="/assets/js/2.336839c5.js" defer></script><script src="/assets/js/29.b8c6cf94.js" defer></script>
  </body>
</html>
